import {
  defined,
  MaterialProperty
} from '@cesiumjs';

import PolylineColorGlowMaterialProperty from "./PolylineColorGlowMaterialProperty"

function MaterialPropertyInit() {

  const mp = MaterialProperty;

  mp.PolylineColorGlow = PolylineColorGlowMaterialProperty;

  mp.fromType = function(type, uniforms) {
    const propCtor = mp[type];
    if (propCtor) {
      return new propCtor(uniforms)
    }
    console.error(`${type} not exists!`)
  }
}

export default MaterialPropertyInit;
